package com.yangran.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ThymeleafController {

@RequestMapping(value = "/thymeleaf/test")
public String index(Model model) {
        model.addAttribute("data","SpringBoot 成功集成 Thymeleaf 模版！");
        // html 文件名不能与url路径名相同 eg /thymeleaf/index
        return "index";
    }
}
